import {NestFactory} from '@nestjs/core';
import {AppModule} from './modules/app.module';
import {applicationConf} from "./application";
import {ValidationPipe} from '@nestjs/common';
import "reflect-metadata"

async function bootstrap() {
    const app = await NestFactory.create(AppModule);
    app.setGlobalPrefix('api/v1/');

    app.useGlobalPipes(
        new ValidationPipe({
            transform: true,
        }),
    );

    await app.listen(applicationConf.port);

}

bootstrap();
